package com.ccp.dev.qbdms.ws.util;

import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;

public class ReturnZsjUtil {

	public static String returnXmlStr(String code,String flag,String msg){
		
		//创建Document
		Document document = DocumentHelper.createDocument();
		//根节点
		Element responseEle = document.addElement("response");
		
		Element itemEle = responseEle.addElement("item");
		
		Element codeEle = itemEle.addElement("code");
		codeEle.setText(code);
		Element flagEle = itemEle.addElement("flag");
		flagEle.setText(flag);
		Element msgEle = itemEle.addElement("msg");
		msgEle.setText(msg);
		
		return document.asXML();
	}
	
}
